package com.ccys.cms.controller.inventory;


import com.ccys.cms.service.inventory.PurchaseOrderService;
import com.ccys.common.vo.ResponseResult;
import com.ccys.db.dto.web.inventory.InventoryFlowDto;
import com.ccys.db.vo.web.inventory.InventoryFlowVo;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Slf4j
@RestController
@RequestMapping("/inventory")
@Api(tags = "库存流水")
public class InventoryFlowController {


    @Resource
    private PurchaseOrderService service;

    @ApiOperation(value = "查询分页", notes = "排序字段 t1.batch_no / t1.quantity / t1.reference_no /  t1.created_on ")
    @GetMapping("inventoryFlow")
    public ResponseResult<PageInfo<InventoryFlowVo>, Object> getPage(InventoryFlowDto dto) {

        return service.getInventoryFlow(dto);
    }
}
